package com.cos.lession77.web.controller;

import com.cos.lession77.entity.Dept;
import com.cos.lession77.service.DeptServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: COS
 * @time: 2022/10/10 11:23
 * @description:
 */
@RestController
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptServices deptServices;

    @GetMapping("/getAll")
    public List<Dept> getAll(){
        return deptServices.getAll();
    }
}
